package cn.lds.j367.dsbank.service;

import cn.lds.j367.dsbank.common.condition.CustomerCondition;
import cn.lds.j367.dsbank.common.dto.ResultDTO;
import cn.lds.j367.dsbank.common.utils.Pager;
import cn.lds.j367.dsbank.entity.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerService {

    //根据条件分页查询
    ResultDTO<List<Customer>> selectCustomerByCustomerCondition(@Param("condition") CustomerCondition condition, @Param("pager") Pager pager);

    //根据条件查询客户的数量
    ResultDTO selectCustomerCount(CustomerCondition condition);

    //根据编号查询
    ResultDTO<Customer> selectCustomerByCustomerId(Integer customerId);

    //添加客户
    ResultDTO addCustomer(Customer customer);

    ResultDTO updateCustomer(Customer customer);

    ResultDTO deleteCustomer(Integer customerId);
}
